package com.gqj.meter.domain;

import com.gqj.common.annotation.Excel;
import com.gqj.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.apache.poi.ss.usermodel.IndexedColors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 库区信息对象 MD_WH_AREA_INFO
 *
 * @author lxq
 * @date lxq-01-09
 */
public class MdWhAreaInfo extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 库区标识，本实体记录的唯一标识
     */
    @ApiModelProperty("主键")
    private Long whAreaId;

    /**
     * 操作标识
     */
    @ApiModelProperty("操作标识")
    private Long operId;

    /**
     * 库房标识，用来与库房进行关联
     */
    @ApiModelProperty("库房标识")
    @Excel(name = "库房标识", headerBackgroundColor = IndexedColors.RED1, prompt = "请输入系统中对应的库房标识")
    private Long whId;

    /**
     * 库区编号，库区的用户自编号
     */
    @ApiModelProperty("库区编号")
    private String whAreaNo;

    /**
     * 库区名称
     */
    @ApiModelProperty("库区名称")
    private String name;

    /**
     * 库区类别，01：电能表、02：互感器、03：采集终端
     */
    @ApiModelProperty("库区类别")
    @Excel(name = "库区类别", dictType = "ra_type_code")
    private String typeCode;

    /**
     * 功能类别，01：新设备库、02：成品库、03：周转库、04：拆回库、05：待检库、06：已检库、07：其它
     */
    @ApiModelProperty("功能类别")
    @Excel(name = "功能类别", dictType = "ra_func_type_code")
    private String funcTypeCode;

    /**
     * 专业类别，01：电能、02：电测、03：热工
     */
    @ApiModelProperty("专业类别")
    @Excel(name = "专业类别", dictType = "ra_field_sort_code")
    private String fieldSortCode;

    /**
     * 库区状态，01：运行、02：锁定、03：废弃
     */
    @ApiModelProperty("库区状态")
    @Excel(name = "库区状态", dictType = "ra_status_code")
    private String statusCode;

    /**
     * 库区面积
     */
    @ApiModelProperty("库区面积")
    @Excel(name = "库区面积")
    private String whAreaSize;

    @ApiModelProperty("库房编号")
    private String whNo;

    /**
     * 库房名称
     */
    @ApiModelProperty("库房名称")
    private String whName;

    /**
     * 库区主键集合
     */
    @ApiModelProperty("库区主键集合")
    private Long[] whAreaIds;

    public Long[] getWhAreaIds() {
        return whAreaIds;
    }

    public void setWhAreaIds(Long[] whAreaIds) {
        this.whAreaIds = whAreaIds;
    }

    public void setWhAreaId(Long whAreaId) {
        this.whAreaId = whAreaId;
    }

    public Long getWhAreaId() {
        return whAreaId;
    }

    public void setOperId(Long operId) {
        this.operId = operId;
    }

    public Long getOperId() {
        return operId;
    }

    public void setWhId(Long whId) {
        this.whId = whId;
    }

    @NotNull(message = "库房标识不能为空")
    public Long getWhId() {
        return whId;
    }

    public void setWhAreaNo(String whAreaNo) {
        this.whAreaNo = whAreaNo;
    }

    @NotBlank(message = "库区编号不能为空")
    public String getWhAreaNo() {
        return whAreaNo;
    }

    public void setName(String name) {
        this.name = name;
    }

    @NotBlank(message = "库区名称不能为空")
    public String getName() {
        return name;
    }

    public void setTypeCode(String typeCode) {
        this.typeCode = typeCode;
    }

    public String getTypeCode() {
        return typeCode;
    }

    public void setFuncTypeCode(String funcTypeCode) {
        this.funcTypeCode = funcTypeCode;
    }

    public String getFuncTypeCode() {
        return funcTypeCode;
    }

    public void setFieldSortCode(String fieldSortCode) {
        this.fieldSortCode = fieldSortCode;
    }

    public String getFieldSortCode() {
        return fieldSortCode;
    }

    public void setStatusCode(String statusCode) {
        this.statusCode = statusCode;
    }

    public String getStatusCode() {
        return statusCode;
    }

    public void setWhAreaSize(String whAreaSize) {
        this.whAreaSize = whAreaSize;
    }

    public String getWhAreaSize() {
        return whAreaSize;
    }

    public String getWhNo() {
        return whNo;
    }

    public void setWhNo(String whNo) {
        this.whNo = whNo;
    }

    public String getWhName() {
        return whName;
    }

    public void setWhName(String whName) {
        this.whName = whName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("whAreaId", getWhAreaId())
                .append("operId", getOperId())
                .append("whId", getWhId())
                .append("whAreaNo", getWhAreaNo())
                .append("name", getName())
                .append("typeCode", getTypeCode())
                .append("funcTypeCode", getFuncTypeCode())
                .append("fieldSortCode", getFieldSortCode())
                .append("statusCode", getStatusCode())
                .append("whAreaSize", getWhAreaSize())
                .toString();
    }
}
